Toy Hexing Tutorial by ECRose of Malevolent. (www.mythicsilence.com/malevolent)

Toy hexing is a very fun and rewarding process, especially if you enjoy drawing in photoshop or another similar program. 
Ill go ahead and break this down into steps, and hopefully it will give you some insight on not only HOW to hex toyz, but whether 
or not you would enjoy hexing toyz.

You will need 3 programs.
LNZ Pro (Available here: http://www.sherlocksoftware.org/page.php?id=4 
Tinker  (Available here: http://www.sherlocksoftware.org/page.php?id=4 )
A hex editor (I use Hexedit by Harmony Systems. Download locations can be found via google or yahoo searches. 
The program itself is safe, but some download locations will be listed as unsafe by your browser because there are also unsafe files 
available on the site, so be careful where you choose to download from. There are also other hex editors that will work just as well, 
so if you find one available at a location you trust, use it).

We will be opening files located here by default:
C:\Program Files\Ubi Soft\Studio Mythos\Petz 5\Resource\Toyz

PLANNING

Planning is essential. Before you open up a program think about what it is you want to make. Is it something that your petz will eat? 
Fetch? Chew on? This is important to consider so that you choose a fitting toy for your base, and also for you to analyze what you are 
going to need to draw up in photoshop. This seems very simple, but some choices can be better than others when it comes to making your 
new toy the best it can be. 

Planning is also important since not all of the toyz are made the same way. Toyz like the bone, milk bottle and stick use linez like a 
breed, therefore they are altered like one, and their data is stored in some harder to find areas unless you make some alterations to 
your game. 

Also, some toyz have a specific path so the new name you give them needs to be exactly the same length as the old one. 
Im using the Bone Treat Box as my example for this tutorial, so to check for a path, open the Bone Treat Box in your hex editor and 
use the find feature (under search in Hexedit) and type download in the box. Scroll own until you see ?Avtype_info@@. 
If there is nothing immediately before that phrase, the toy can be named whatever you want. If it does have a path, you will need to be 
sure the name of the new toy is the same length as the old one. The Bone Treat Box does have a path and it looks like 
this: \Resource\Toyz\Bone Treat Box.toy. Obviously in other toyz the name will reflect the identity of that toy. 

Close the toy in Hexedit without altering anything, we will do that later.

LNZ PRO

Okay, after deciding what I want to make, and what toy I am going to base it off of, what I like to do next is open up the 
base toy in LNZ Pro to start making the necessary changes for it to show up separately in the case. Essentially, this will be duplicating 
the original toy and there will be two identical ones in your case. This way your image editing takes place in your new toy, not over your 
original. This process is the portion that can confuse people or frustrate them because their toy wont work, doesnt show up, or causes their 
game to crash, but dont panic, it is pretty common until you get the hang of things. 

Since I have decided to use the Bone Treat Box  for this tutorial,  we are going to pretend that you really want to make some new edibles 
for your petz. Now that you are looking at your toy in LNZ Pro you will see that there are the collapsible lists on the side, just like a
breed file. Im going to work my way down this list, because there are multiple things that need to be changed  as we make the magical 
journey to the bottom.

So lets take a look

SPR
  Under SPR you will see several items listed (the number varies from toy to toy). These are the names of the sprites that the toy uses.
  The game uses these sprites to identify the toy.  These sprites locate the toys images, sounds and other attributes for the game. 
  Now, if the game has two toyz with identical sprites, it is going to use one set of data for both toyz, whichever you take out of the 
  case first. Well we dont want that. Your pet may want his bone treats and the new ones you are going to make. So you can see there are 
  TBOX_O1 and TREA_O1 as sprites for the bone treats. It is time to think of a new name for these two sprites. Keep in mind that other 
  people besides you and me make toyz and they are renaming their sprites too, so it is best to think of something that is very unique
  so no clashing occurs. It also needs to be 4 letters, the underscore _ then a letter and number, just as the original. I often change
  the entire sprite, not just the final letter and number, to avoid clashing. I like making silly ones to be extra safe. Lets make it
  PUTT_P1 for the TBOX_O1 sprite. TREA_O1 is for the actual little bone we pull out of the box. So lets rename it to PULL_P2. Easy to
  remember and *probably* not in use.  

SPR, when expanded, should now have
PUTT_P1
PUTT_P1_AWAY
PULL_P2

Remember: We are changing anything that is TBOX_O1 or TREA_O1 to PUTT_P1 and PULL_P2 respectively. Text like AWAY and BEVENT stays
 the same, just change the sprite itself so that it is consistent. Lets move on and I will briefly point out the other sprite locations
 seen in LNZ Pro.

TXT
  BEVENT_TBOX_O1 should change to BEVENT_PUTT_P1. And BEVENT_TREA_O1 should change to BEVENT_PULL_P2. Notice how there is the number 437
  in the main box of LNZ Pro when the BEVENT_TBOX_O1/PUTT_P1 is highlighted? That number triggers the on screen tip text that goes with the
  toy. You know, like Right click to pick up your pet and all of those. If we dont want the game to say something about the bone treats 
  when we yank our new goodies out of the toy case we can SPACE over these numbers, by that I mean you can have a space to take the place
  of the 4, the 3, and the 7, do not just hit backspace and get rid of them, that will bug the file. The number for BEVENT_TREA_O1/PULL_P2 
  is 438. The same method applies. 

  In Petz 3 and 4 you can simply change the text to talk about your new toy instead of the old one, but Petz 5 does not have this fun luxury,
  the text can only be removed by spacing over the numbers. This is a small detail, and you can leave it be if youd like, but Ive hexed 
  toyz and had people ask me to edit this text before.

  The TXT section is where toyz that have sounds will have a sound section. If the toy does not have sounds you are done with the TXT
  section because thats all there is! I chose a toy that does have sounds so that you know how to work with them. SOUNDS_TBOX_O1 is listed
  for the bone treats. You would change that sprite to, yep you guessed it, SOUNDS_PUTT_P1. With this still highlighted we can see in the
  main box in LNZ Pro that there is a path for the game to find the sounds, remember to change the path to also say PUTT_P1, or the game
  will not find the subsequent sounds in your file. Also, if your base toy makes sounds and you dont want your new toy to make those
  sounds, you simply type NONE directly below the path and remove the .wav files that are listed there. 

TXT should now look like this
BEVENT_PUTT_P1
BEVENT_PULL_P2
SOUNDS_PUTT_P1

WAV 
 This section is found in files with sounds. We Wave at the WAV section and keep moving along without touching it. We already did what
 we need to with the sounds above.

STRING LIST
  The 63 section is where we need to go. In the main box you will see the name of the toy, written twice, and then another sprite to
  change. When selecting a name for your toy, remember that if it is a toy with a path like we talked about it needs to have the exact
  same number of characters as the original toy.  The bone treat box DOES have a path, so its name will have to equal the number of 
  characters in Bone Treat Box. Then of course the sprite must be changed to match the others.

RCDATA
  This section has a couple of things to remember, and it is all in the main box. The first is that the sprite name is there to change 
  again, as well as the new name for your toy. After that it is time to give it its own unique ID number, just like a breed. In the case of
  the bone treats there is a section for the box and the individual treat. Type in the sprite, a display name for the treat, and an ID 
  number for the treat as well. (If it is a file like, say the blue pillow, there will only be one section to fill out because obviously
  the blue pillow has only one component). After this select File, Save As and then name the file the exact same name as your new toy. 
  Tell LNZ Pro to save it as a New Breed. Dont bother with the ID number part, it will already display what you manually changed it to 
  in RCDATA. Just go ahead and get it saved, then close the toy. Dont forget to do that!

Before completing this next step please make sure that you have the latest version of LNZ Pro. A version with the following feature was
released for a while that had a bug. The newest version has this feature without the bug. If you downloaded LNZ Pro fresh for this 
tutorial, then youre fine. :) 

To check that your ID number doesnt clash, go to File then Open folder and navigate to the toyz folder and click the Breeds and toys
tab to see the ID numbers on all of your toyz and make sure that yours is not the same as another file. 

3. HEXEDIT
  Great! The toy is all ready for the fun part right? Wrong. Sorry. We need Hexedit for more than just path checking. Open your new toy. 
  There are some sprites that we have to change here too before we are completely finished. Do not be afraid, we dont have to go through
  this whole file. Just use your Hex editors Find feature. (In Hexedit it is under search). In the box that pops up, type download. 
  you will be taken deep into the file. From this point scroll down and change any instances of the base toy sprites until you get to the
  line that says ?Avtype_info@@. To change the sprites the most efficiently, highlight the sprite and then type in your changes to prevent 
  mistakes. Also, instances where a sprite appears, such as "TREA" but no underscore or and letter number combo appears afterward, just change 
  TREA to PULL. It works this way whenever this situation occurs. In some toyz it feels like forever before you get to ?Avtype_info@@., in 
  others you will only bump into a few last sprites. If there is a path, you can replace the name of the base toy with the name of your new 
  toy now. Save. Close the toy.
 
Open Tinker. Select File Modify carrying case and add your new toy to your case (for Petz 5). Ive forgotten this many times and have wondered for
a moment why my toy is not showing up!

After that go ahead and open Petz and check to see if there are now two functioning base toyz in your case. If you find them and there is
a bug or a crash, then there is usually just a missed sprite somewhere and you can go back and fix it, dont worry, it doesnt hurt the game. If
you find that your toy is not showing up, even when the ID number is unique do not be frustrated. The game is finicky about what ID numbers
it will accept for toyz, and even though there are no errors, if it doesnt like the number you chose it wont put the toy in your game. 
Just go back and change the ID to another number. I find that a LOWER number is generally accepted while the higher ones sometimes, for no
real reason, just arent. Once you have two identical toyz in the closet it is time for the fun part.

4. TINKER
  Open your toy. You will have a few options for which portion to open. Usually one for away in the case and one for out in the game.
  Sometimes there are more, like for the treat you pull out of the bone treat box. Lets explore. Open the out in the game portion which
  should simply be the sprite name. There are resting shots and dropped animations and all kinds of things! Oh my! Essentially what we do 
  in Tinker is replace the current images with ones that we make ourselves in photoshop/paintshop or whatever program you fancy.  
  Tinker accepts .bmp and .png files. You dont have to export the old images if you dont want to, you can import yours right into Tinker.
  Remember, with a .bmp you have to use a specific color (magenta) for the background so that petz reads it as transparent. It becomes tedious to keep
  your toyz from having a hot pink haze. .png images support transparency, so you can have a transparent background on them and not worry 
  about the background color business. 
 
Colors! Petz uses a specific color palette and if you use a color that isnt in it, the game will make it into a color that it does 
recognize, and sometimes that isnt pretty. Photoshop allows you to save color palettes, so that you can use the petz palette for when 
you make toyz. But I know that not everyone has photoshop, and a lot of other programs dont have this feature. I DO use photoshop but I 
didnt always have it, so I developed another method that I actually still use in photoshop today since old habits die hard. I use a 
ratherpainterly method that should work for a wide variety of programs. I have a .jpg image of the petz color palette 
with the color numbers. Using the eyedropper tool you can select a color from it and then paint with it. This way I know the exact number 
of the color I picked, and I can document it so that I know exactly which shades my toy is using. I keep it open while I work and just 
eyedropper my desired colors the way a painter dips his brush. 

If you would rather save a palette and do not know how, or have other questions about photoshop or your whatever program you are using I
can try to help via an email, but Im keeping this tutorial toy specific, so Im going to move past the features of these programs and back
to Tinker. 

Once I have a new image, I go to Tinker, click import on the desired frame, select my new picture, and there it is! This is the basic
idea of Tinker, so I will just conclude with some handy tips, because the rest is up to you!

Things to remember:

1. The x and y axis below the import and export buttons. Note what the numbers are for the original images! I try to keep them consistent,
   and then I tweak them as I alter my toy. The x and y axis here is basically where your toy is in proximity to the hand when it 
   picks up the toy in the game. If your toy is floating far away from the hand when you grab it, change these numbers until the hand is 
   where you want it to be on/in your toy when you pick it up. Y adjusts the vertical, X adjusts the horizontal.

2. Adding/Deleting frames. THIS IS VERY IMPORTANT. You can add frames and you can delete them. When you add one a default Tinker image is
   placed in a fresh frame for you to paste your own on top of. If your toy does not have as many frames of animation as the original you
   can delete the extras. HOWEVER, you should NOT delete an entire SET of frames. 

   Here is an example. The stuffed unicorn has two Drop animations. One for it dropping and just kind of flopping, the other for it to
   drop and then tip over. Maybe you dont want to make two different drop animations. In this case you would be tempted to delete 
   everything out of the second set of drop frames. If you do this the toy will work in the game bug free. It WILL NOT be able to be 
   opened again by Tinker or LNZ Pro. It will say that the file is corrupt. When you delete frames there must be at least one left in the 
   framset to ensure that your toy can be edited or converted to another petz version in the future. This doesnt mean you have to make two
   drop animations. It just means you should paste the same animation in twice. In other cases where it isnt a drop animation I want to 
   get rid of  Ive deleted down to one frame and inserted the resting picture I made if it is suitable, or some other usable picture. 
   It depends on the toy, so you will have to use good judgment as to what the best way is to prevent a total frameset deletion.

I think that covers the basics.  
Good luck and have fun!

Did my tutorial not work for you at all? Perhaps this tutorial will explain the process more clearly for you:
http://boardwalkerz.com/carolyn/downloabx/tutorials/PetzToys.txt 
